﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="YUIList.aspx.cs" Inherits="ZX.Web.UI.Controls.DataGrid" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <!--CSS file (default YUI Sam Skin) -->
    <link rel="stylesheet" type="text/css" href="/scripts/yui_2.9.0/build/reset-fonts-grids/reset-fonts-grids.css" />
    <link rel="stylesheet" type="text/css" href="/scripts/yui_2.9.0/build/container/assets/skins/sam/container.css" />
    <link rel="stylesheet" type="text/css" href="/scripts/yui_2.9.0/build/menu/assets/skins/sam/menu.css" />
    <link rel="stylesheet" type="text/css" href="/scripts/yui_2.9.0/build/button/assets/skins/sam/button.css" />
    <link rel="stylesheet" type="text/css" href="/scripts/yui_2.9.0/build/resize/assets/skins/sam/resize.css" />
    <link rel="stylesheet" type="text/css" href="/scripts/yui_2.9.0/build/layout/assets/skins/sam/layout.css" />
    <link rel="stylesheet" type="text/css" href="/scripts/yui_2.9.0/build/layout/assets/skins/sam/layout-skin.css" />
    <link rel="stylesheet" type="text/css" href="/Scripts/yui_2.9.0/build/datatable/assets/skins/sam/datatable.css" />
    <link rel="stylesheet" type="text/css" href="/Scripts/yui_2.9.0/build/paginator/assets/skins/sam/paginator.css" />
    <link href="/ExtendPage/Template/matrix-1/css/bootstrap.min.css" rel="stylesheet"
        type="text/css" />
    <link rel="stylesheet" href="/ExtendPage/Template/matrix-1/css/bootstrap-responsive.min.css" />
    <link rel="stylesheet" href="/ExtendPage/Template/matrix-1/css/matrix-style.css" />
    <link rel="stylesheet" href="/ExtendPage/Template/matrix-1/css/matrix-media.css" />
    <link href="/ExtendPage/Template/matrix-1/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <!--begin custom header content for this example-->
    <style type="text/css">
        .yui-skin-sam table
        {
            width: 100%;
        }
        
        input[type=text]
        {
            height: 15px;
            line-height: 16px;
            font-size: 12px;
        }
        input[type=button]
        {
            height: 24px;
            line-height: 24px;
            font-size: 12px;
        }
        .headcol
        {
            position: relative; /*width:5em;*/
            left: 0;
            top: auto;
            border-right: 0px none black;
            border-top-width: 3px; /*only relevant for first row*/
            margin-top: -3px; /*compensate for top border*/
        }
        #button-example-form fieldset, #button-example-form fieldset div
        {
            border: 2px groove #ccc;
            margin: .5em;
            padding: .5em;
        }
        .yui-layout-unit-bottom
        {
            border: 0px;
        }
        
        #yui-gen6
        {
            border: 0px;
        }
        
        .grid
        {
            margin: 0px;
            border-collapse: collapse;
            table-layout: fixed;
        }
        .grid thead td
        {
            border-top: 1px solid #ccc;
            border-bottom: 1px solid #ccc;
            border-right: 1px solid #ccc;
            background: url(../Images/column-header-bg.png) repeat-x;
            text-align: left;
            padding: 5px 1px;
            font-weight: normal;
            text-overflow: ellipsis;
            word-break: keep-all;
            overflow: hidden;
            font-weight: bold;
            color: #666;
        }
        .grid tbody tr th
        {
            border-top: 1px solid #ccc;
            border-bottom: 1px solid #ccc;
            border-right: 1px solid #ccc;
            background: url(../Images/column-header-bg.png) repeat-x;
            text-align: left;
            padding: 5px 1px;
            font-weight: normal;
            text-overflow: ellipsis;
            word-break: keep-all;
            overflow: hidden;
            font-weight: bold;
            color: #666;
        }
        .grid tbody td
        {
            text-align: left;
            border-bottom: 1px solid #ccc;
            border-right: 1px solid #ccc;
            padding: 1px 1px;
            height: 20px;
            word-break: break-all;
        }
        .grid tbody td .txt
        {
            border: 0px solid #fff;
            font: Verdana, Geneva, sans-serif,宋体;
            padding: 0px;
            height: 22px;
            line-height: 22px;
            width: 100%;
        }
        .grid tbody td .disabled
        {
            background: #F7F7F7;
        }
        .grid tfoot td .txt
        {
            border: 0px solid #fff;
            font: Verdana, Geneva, sans-serif,宋体;
            padding: 0px;
            height: 22px;
            line-height: 22px;
            width: 100%;
        }
        .grid tfoot td
        {
            border-right: 1px solid #ccc;
            background: #FFFDCD;
            text-align: left;
            padding: 3px 1px;
            font-weight: normal;
            text-overflow: ellipsis;
            word-break: keep-all;
            overflow: hidden;
        }
        .grid tbody td .txtselect
        {
            border: 0px solid #fff;
            padding: 0px;
            font: Verdana, Geneva, sans-serif,宋体;
            height: 22px;
            line-height: 22px;
            width: 100%;
        }
        .td-div
        {
            background: #F7F7F7;
            cursor: pointer;
        }
        .tableobj
        {
            margin: 0px;
            border-collapse: collapse;
            table-layout: fixed;
        }
        .tableobj tbody td
        {
            text-align: left;
            border-right: 1px solid #ccc;
            padding: 1px 1px;
            height: 20px;
            word-break: break-all;
        }
        .tableobj tbody .selected
        {
            background-color: #6699cc;
            color: #fff;
        }
        
        /*查询*/
        
        #div_list_query table tbody tr td
        {
            border: 0px;
            border-bottom: 1px solid #ccc;
        }
        #div_list_query table thead th
        {
            border: 0px;
            overflow: hidden;
            background-color: #eee;
            border: 1px solid #ddd;
            font-weight: bold;
        }
        #div_list_query_data
        {
            overflow: auto;
        }
        #div_list_query
        {
            overflow: hidden;
        }
    </style>
</head>
<body class="yui-skin-sam">
    <form id="form1" runat="server">
    <div id="layout" style="width: 100%; height: 100%">
    </div>
    <!-- 工具栏 -->
    <div id="listpage">
        <div id="toolbar" style="margin: 2px;">
            <% if (QuciklyQueryFields != string.Empty)
               {  %><div style="float: right; width: 200px; vertical-align: middle" class="form-inline">
                   <label class="checkbox">
                       <input type="checkbox" id="checkAndOr" />并集
                   </label>
                   <input id="QueryContext" class="input-small" type="text" />
                   <input type="button" id="btnQuickQuery" name="btnQuickQuery" onclick="javascript:fnQuciklyQuery();"
                       value="搜" />
               </div>
            <%} %>
            <div class="btn-group" data-toggle="buttons-radio">
                <% =BtnItems %>
                <button type="button" id="btnReload" name="btnReload" onclick="javascript:fnReload();">
                    刷新</button>
            </div>
            <% =btnMore%>
            <%if (GetStringFromQueryString("isShonwBtn", "Y") != "N")
              { %>
            <%--<button type="button" id="btnFull" name="btnFull">
                    全屏</button>--%>
            <%--<button type="button" id="btnClose" name="btnClose">
                    关闭当前页</button> --%>
            <%} %>
        </div>
        <div id="data">
            <div id="json">
            </div>
        </div>
        <div id="bottom">
            <div id="pagetotal" style="float: left; height: 25px; padding: 8px; margin-top: 3px;
                width: 100px;">
            </div>
            <div id="page" style="float: left">
            </div>
            <div id="skipPage" style="float: left; padding-left: 5px;" class="yui-pg-container form-inline">
                <input id="PageNo" value="0" type="text" style="width: 50px" /><input type="button"
                    id="btnGo" onclick="fnGoPage()" value="go" /></div>
        </div>
    </div>
    <!-- 对话框 -->
    <div id="dialogArea">
        <div id="dialog1" class="yui-pe-content">
            <div class="hd">
                <% =PageTitle %>数据编辑</div>
            <div class="bd">
                <iframe id="EditUIWindow" frameborder="0" src="" style="width: 100%; height: 100%;
                    margin: 0px; padding: 0px;"></iframe>
            </div>
        </div>
        <div id="dialog2" class="yui-pe-content">
            <div class="hd">
                选择基本信息:</div>
            <div class="bd">
                <iframe id="EditUIWindow1" frameborder="0" src="" style="width: 100%; height: 100%;
                    margin: 0px; padding: 0px;"></iframe>
            </div>
        </div>
        <div id="dialog3" class="yui-pe-content">
            <div class="hd">
                提示</div>
            <div class="bd">
                你正在删除当前选择的数据，继续请按确定？
            </div>
        </div>
        <div id="dialog4" class="yui-pe-content">
            <div class="hd">
                查询</div>
            <div class="bd">
                <iframe id="QueryWindow" frameborder="0" src="" style="width: 100%; height: 100%;
                    margin: 0px; padding: 0px;"></iframe>
            </div>
        </div>
        <div id="dialog5" class="yui-pe-content">
            <div class="hd">
                <% =PageTitle %>
                数据详情</div>
            <div class="bd">
                <iframe id="EditUIWindow3" frameborder="0" src="" style="width: 100%; height: 100%;
                    margin: 0px; padding: 0px;"></iframe>
            </div>
        </div>
    </div>
    </form>
</body>
<script type="text/javascript" src="/Scripts/yui_2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="/Scripts/yui_2.9.0/build/element/element-min.js"></script>
<script type="text/javascript" src="/Scripts/yui_2.9.0/build/datasource/datasource-min.js"></script>
<script type="text/javascript" src="/Scripts/yui_2.9.0/build/json/json-min.js"></script>
<script type="text/javascript" src="/Scripts/yui_2.9.0/build/connection/connection-min.js"></script>
<script type="text/javascript" src="/Scripts/yui_2.9.0/build/get/get-min.js"></script>
<script type="text/javascript" src="/Scripts/yui_2.9.0/build/dragdrop/dragdrop-min.js"></script>
<script type="text/javascript" src="/Scripts/yui_2.9.0/build/datatable/datatable-min.js"></script>
<script type="text/javascript" src="/Scripts/yui_2.9.0/build/paginator/paginator-min.js"></script>
<script type="text/javascript" src="/scripts/yui_2.9.0/build/layout/layout-min.js"></script>
<script type="text/javascript" src="/scripts/yui_2.9.0/build/container/container-min.js"></script>
<script type="text/javascript" src="/scripts/yui_2.9.0/build/resize/resize-min.js"></script>
<script type="text/javascript" src="/scripts/yui_2.9.0/build/event-delegate/event-delegate-min.js"></script>
<script src="/Scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="/ExtendPage/Template/matrix-1/js/jquery.ui.custom.js" type="text/javascript"></script>
<script src="/ExtendPage/Template/matrix-1/js/bootstrap.min.js" type="text/javascript"></script>
<script src="/Scripts/jquery.form.js" type="text/javascript"></script>
<script src="/Scripts/jquery.action.js" type="text/javascript"></script>
<!-- 通用方法 -->
<script src="/Scripts/common.js" type="text/javascript"></script>
<!-- 定义数据格式化方法 -->
<script src="/Scripts/yui.list.dataformat.js" type="text/javascript"></script>
<!--  用于加载自定义脚本 -->
<script src="/Scripts/appjs/model.<% =EntityName %>.js?r=1.1" type="text/javascript"
    language="javascript"></script>
<script type="text/javascript">
    var _IsNoEntity = "N",
        _ListPage = "datagrid",
        _EditDataURL="";
        const_entityID = "<% =EntityId %>",    //实体ID名称
        const_entityName = "<% =EntityName %>",//实体名称
        const_EditEntity = "<% =EditEntity %>",//编辑实体名
        const_functionId   ="<% =FunctionID %>",//自定义条件
        const_Order ="<% =Order %>",           //排序  
        const_UserId = "<% = UserId %>",       //
        const_UserName = "<% = this.User.LoginName %>",  
        const_DataFields = [<% =DataFields %>],
        const_DataColums = [<% =DataColums %>],

        const_EditWindowWidth = "<% =EditWindowWidth %>px",
		const_EditWindowHeight = "<% =EditWindowHeight %>px",

        const_QueryField="<% =QuciklyQueryFields %>",
        const_CustomCondition = encodeURI("<% =DefineCondition %>"),//查询方案条件
        const_Condition =  encodeURI("<% =Condition %>"),//
        const_PageTitle=encodeURI("<% =PageTitle %>"),
        selectControl=null,
        requireUrl="",
        initialRequestUrl = "pageindex=1&entity=" + const_entityName + "&order="+const_Order+"&r="+Math.random()+"&zip=94089&results=10&output=json&functionid="+const_functionId+"&customCondition="+ const_CustomCondition+"&condition="+const_Condition,
        SaveUrl="",dl=[],//要删除的数据列  
        const_height=0,const_width=0;
</script>
<script type="text/javascript">
    (function () {
        var Dom = YAHOO.util.Dom,
        Event = YAHOO.util.Event;
        if (navigator.userAgent.match(/iPad|iPhone/i)) {
            Event.onDOMReady(function () {
                const_height = Dom.getViewportHeight();
                const_width = Dom.getViewportWidth();
                var layout = new YAHOO.widget.Layout("layout", {
                    height: Dom.getViewportHeight(),
                    width: Dom.getViewportWidth(),
                    units: [
                    { position: 'top', height: 35, body: 'toolbar', gutter: '1 1 1 1', scroll: null, zIndex: 2 },
                    //{ position: 'left', header: '功能模块', width: 250, body: 'left', gutter: '1 5 1 1', collapse: true, scroll: true, zIndex: 1, resize: true },
                    {position: 'center', body: 'data', gutter: '1 1', scroll: false },
                    { position: 'bottom', height: 35, body: 'bottom', gutter: '1 1' }
                ]
                });
                layout.render();
            });
        } else {
            Event.onDOMReady(function () {
                const_height = Dom.getViewportHeight();
                const_width = Dom.getViewportWidth();
                var layout = new YAHOO.widget.Layout(
                { units: [
                { position: 'top', height: 35, body: 'toolbar', gutter: '1 1 1 1', scroll: null, zIndex: 2 },
                    //{ position: 'left', header: '功能模块', width: 250, body: 'left', gutter: '1 5 1 1', collapse: true, scroll: true, zIndex: 1, resize: true },
                {position: 'center', body: 'data', gutter: '1 1', scroll: false },
                { position: 'bottom', height: 35, body: 'bottom', gutter: '1 1' }
            ]
                });
                layout.render();
            });
        }
    })();
</script>
<script src="/Scripts/ctrls/jQuery.DataQuery.js" type="text/javascript"></script>
<!-- YUI  通用功能  -->
<script src="/ExtendPage/Scripts/list.common.js" type="text/javascript"></script>
<!--  用于加载按扭方法 -->
<script src="/Scripts/yui.list.button.event.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
    $(document).ready(function () {
        $("#toolbar>.btn-group>button").addClass("btn");
        $("#toolbar>.btn-group>button").addClass("btn-info");
        $("#toolbar>.btn-group>span").addClass("btn-mini");
        setTimeout(function () {
            $("button").addClass("btn");
            $("button").addClass("btn-info");
        }, 100)
    });

</script>
<script src="/Scripts/ctrls/jquery.fixed.menu.js" type="text/javascript"></script>
<script src="/Scripts/ctrls/jquery.fixed.windows.js" type="text/javascript"></script>
<script src="/Scripts/ctrls/jquery.fixed.dialog.js" type="text/javascript"></script>
</html>
